package service.impl;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.CourseDao;
import po.Course;
import service.CourseService;


@Service("courseService")
@Transactional
public class CourseServiceImpl implements CourseService {
	@Autowired
	private CourseDao courseDao;

	@Override
	public List<Course> getCourseList() {
		return courseDao.getList();
	}

	@Override
	public int deleteCourse(Integer courseid) {
		return courseDao.delCourse(courseid);
	}

	@Override
	public int addCourse(Course course) {
		return courseDao.addCourse(course);
	}

	@Override
	public Course getCourseId(Integer id) {
		return courseDao.getCourseId(id);
	}

	@Override
	public int updateCourse(Course course) {
		return courseDao.updateCourse(course);
	}

}
